package com.taxshare.seller.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.taxshare.mybatis.entity.BaseEntity;
import com.taxshare.seller.constant.table.TableConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * @author YANG
 * @ClassName: AlsDocumentDetailEntity
 * @Description:
 * @date 2021-06-21
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName(TableConstant.T_SELLER_ALS_DOCUMENT_DETAIL)
@ApiModel(description = "明源商管单据明细表")
public class AlsDocumentDetailEntity extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    @TableId("uuid")
    private String uuid;

    @ApiModelProperty("单据ID")
    @TableField("doc_id")
    private String docId;

    @ApiModelProperty("货物或应税劳务名称")
    @TableField("cargo_name")
    private String cargoName;

    @ApiModelProperty("税收分类编码(19位)")
    @TableField("cargo_code")
    private String cargoCode;

    @ApiModelProperty("规格型号")
    @TableField("item_spec")
    private String itemSpec;

    @ApiModelProperty("单位")
    @TableField("quantity_unit")
    private String quantityUnit;

    @ApiModelProperty("数量 （最大精确小数点后八位负数清单发票不需要传负数发票为负值）")
    @TableField("quantity")
    private String quantity;

    @ApiModelProperty("不含税单价")
    @TableField("unit_price_out_tax")
    private Double unitPriceOutTax;

    @ApiModelProperty("不含税金额")
    @TableField("amount_without_tax")
    private Double amountWithoutTax;

    @ApiModelProperty("税额")
    @TableField("tax_amount")
    private Double taxAmount;

    @ApiModelProperty("含税金额")
    @TableField("amount_with_tax")
    private Double amountWithTax;

    @ApiModelProperty("零税率标识（空：非零税率，0：出口零税，1：免税，2：不征税，3普通零税率)")
    @TableField("tax_rate_flag")
    private String taxRateFlag;

    @ApiModelProperty("使用优惠政策标识 (0：不使用，1使用)")
    @TableField("prefer_flag")
    private String preferFlag;
    /**
     * 增值税特殊管理(当preferFlag是1时必填
     * taxRateFlag为0填写 出口零税，taxRateFlag为1填写 免税，taxRateFlag为2填写 不征税)
     */
    @ApiModelProperty("增值税特殊管理")
    @TableField("preferMark")
    private String preferMark;

}